package main

import (
	"fmt"
	"sync"
)

const birthTime = "2006-01-02 15:04:05"

func main() {
	var mutex sync.Mutex
	var wg sync.WaitGroup
	money := 1000
	for index := 0; index < 10; index++ {
		wg.Add(1)
		go func() {
			for j := 0; j < 1000; j++ {
				mutex.Lock()
				money++
				mutex.Unlock()
			}
			wg.Done()
		}()
	}
	wg.Wait()
	fmt.Println(money)
}
